package com.macro.mall.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class OmsDistributionOrder implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "订单id")
    private Long orderId;

    @ApiModelProperty(value = "消费者id")
    private Long memberId;

    @ApiModelProperty(value = "佣金")
    private BigDecimal commissionAmount;

    @ApiModelProperty(value = "店铺的用户id")
    private Long storeUserId;

    @ApiModelProperty(value = "店铺id")
    private Long storeId;

    @ApiModelProperty(value = "分销订单状态：0->待买家付款；1->买家已待发货；2->卖家已发货；3->已完成；4->已关闭；5->无效订单；6->佣金已结算")
    private Integer status;

    @ApiModelProperty(value = "买家下单时的订单编号，同时用作佣金订单编号")
    private String orderSn;

    @ApiModelProperty(value = "佣金订单创建时间，一般与买家付款时间一致")
    private Date createTime;

    @ApiModelProperty(value = "乡村经纪人id")
    private Long agentId;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public BigDecimal getCommissionAmount() {
        return commissionAmount;
    }

    public void setCommissionAmount(BigDecimal commissionAmount) {
        this.commissionAmount = commissionAmount;
    }

    public Long getStoreUserId() {
        return storeUserId;
    }

    public void setStoreUserId(Long storeUserId) {
        this.storeUserId = storeUserId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getAgentId() {
        return agentId;
    }

    public void setAgentId(Long agentId) {
        this.agentId = agentId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", memberId=").append(memberId);
        sb.append(", commissionAmount=").append(commissionAmount);
        sb.append(", storeUserId=").append(storeUserId);
        sb.append(", storeId=").append(storeId);
        sb.append(", status=").append(status);
        sb.append(", orderSn=").append(orderSn);
        sb.append(", createTime=").append(createTime);
        sb.append(", agentId=").append(agentId);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
    public enum STATUS{
//        分销订单状态：0->待买家付款；1->买家已待发货；
//        2->卖家已发货；3->已完成；4->已关闭；
//        5->无效订单；6->佣金已结算"
        //        待付款
        WAIT_PAY(0),
        //        待发货
        WAIT_SEND(1),
        //        已发货
        WAIT_RECEIVE(2),
        //        已完成
        FINISH(3),
        //        已关闭
        CLOSE(4),
        //        无效订单
        INVALID(5),
        //        佣金已结算
        SETTLEMENT(6);
        private  int status;
        STATUS(int status){
            this.status = status;
        }
        public int value(){
            return status;
        }
    }
}